package com.czz.sms.utils;

import org.springframework.beans.factory.InitializingBean;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

/**
 * @ClassName: ConstantPropertiesUtil
 * @Author Czz
 * @Date 2020/1/21
 * @Time 15:13
 **/

@Component
public class ConstantPropertiesUtil implements InitializingBean {

    @Value("${jiguang.sms.appKey}")
    private String appKey;

    @Value("${jiguang.sms.masterSecret}")
    private String masterSecret;


    public static String APP_KEY;
    public static String MASTER_SECRET;

    @Override
    public void afterPropertiesSet() throws Exception {
        APP_KEY = appKey;
        MASTER_SECRET = masterSecret;
    }
}
